<?php
//DELIMITER - 分隔符
//
return array(
    'host' => 'www.23wx.com',
    'url' => array(
        'search'    => "http://so.23wx.com/cse/search?q={keyword}&click=1&entry=1&s=15772447660171623812",
        'book'      => "http://www.23wx.com/book/57820",
        'chapter'   => "http://www.23wx.com/html/{bookPrefix}/{bookId}/",
        'content'   => "http://www.23wx.com/html/{bookPrefix}/{bookId}/{chapterId}.html",
        'category'  => "http://www.23wx.com",
        'bookList'  => "http://www.23wx.com/class/{category}_{page}.html",
    ),
    'rule' => array(
        'category' => array(
            'main' => array('start' => 'm_menu', 'end' => 'main'),
            're'   => '/<a href\="(?<categoryUrl>.*?)">(?<categoryName>.*?)<\/a>/', 
        ),
        'bookList' => array(
            'main' => array('start' => 'content', 'end' => 'pages'),
            're'   => '/<tr bgcolor\="#FFFFFF">([\w\W]*?)<td class\="L"><a href\="http:\/\/www\.23wx\.com\/book\/(?<bookId>[\d]+)">(?<bookName>.*?)<\/a><\/td>([\w\W]*?)<td class\="L"><a href\="http:\/\/www\.23wx\.com\/html\/(?<bookPrefix>[\d]+?)\/([\d]+)\/" target\="_blank">(.*?)<\/a><\/td>([\w\W]*?)<td class\="C">(?<bookAuthor>.*?)<\/td>([\w\W]*?)<td class\="R">(?<bookWordsNumber>.*?)<\/td>([\w\W]*?)<td class\="C">(?<bookLastUpdate>.*?)<\/td>([\w\W]*?)<td class\="C">(?<bookState>.*?)<\/td>([\w\W]*?)<\/tr>/',
        ),
        'chapter' => array(
            'main' => array('start' => 'id="at"', 'end' => 'id="foottips"'),
            're'   => '/<a href\="(?<chapterId>[\d]+)\.html">(?<chapterName>.*?)<\/a>/',
        ),
        'content' => array(
            'main' => array(),
            're'   => '/contents">(?<content>.*?)<\/dd>/',
        ),
        'search'  => array(
            'main' => array('start' => 'result-list', 'end' => 'extra'),
            're'   => '/<a cpos\="img" href\="(?<bookUrl>http:\/\/www.23wx.com\/html\/(.*?)\/)"([\w\W]*?)<img src\="(?<bookThumb>http:\/\/www.23wx.com\/files\/article\/image\/(.*?).jpg)"([\w\W]*?)<a cpos\="title"([\w\W]*?)title\="(?<bookName>.*?)"([\w\W]*?)<p class\="result-game-item-desc">(?<bookDesc>.*?)<\/p>/',
        )
    )
);